package cn.anycase.demo.sample.entity;

import java.util.Date;

import org.hibernate.validator.constraints.Length;
import org.hibernate.validator.constraints.NotBlank;

import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

/**
 * <p>
 * </p>
 *
 * @author yuxiaobin
 * @date 2022/8/31
 */
@Data
@TableName("this_is_sample")
public class ThisIsSample {

    @TableId(type = IdType.UUID)
    private String id;

    @ApiModelProperty("名字")
    @NotBlank(message = "名字不能为空")
    private String name;

    private Integer age;

    @ApiModelProperty(value = "性别", allowableValues = "F,M")
    @Length(max = 1, message = "性别参数只有一位，F或者M")
    private String gender;

    @TableField("create_time")
    private Date createTime;

    @TableField("create_by")
    private String createBy;

}
